package com.utils;

/**
 * @Title: Utils.java
 * @Package com.utils
 * @author 孙梦楠
 * @date 2017年7月21日 上午11:22:17
 * @version V1.0.0
 */

public class Utils {
	

	// 检查输入是否为null
	public static boolean notNullAndEmpty(String check) {
		boolean flag = true;
		if (check == null || check.trim().isEmpty()) {
			flag = false;
		}
		return flag;
	}

	public static boolean isNullOrEmpty(String check) {
		boolean flag = false;
		if (check == null || check.trim().isEmpty()) {
			flag = true;
		}
		return flag;
	}

	public static boolean isNull(String check) {
		boolean flag = false;
		if (check == null) {
			flag = true;
		}
		return flag;
	}

	public static boolean notNull(String check) {
		boolean flag = false;
		if (check != null) {
			flag = true;
		}
		return flag;
	}

	public static boolean notEmpty(String check) {
		boolean flag = false;
		if (check != null) {
			if (!check.trim().isEmpty()) {
				flag = true;
			}
		}
		return flag;
	}

	public static boolean isEmpty(String check) {
		boolean flag = false;
		if (check != null) {

			if (check.trim().isEmpty()) {
				flag = true;
			}
		}

		return flag;
	}
	
	public static boolean notEmpty(Integer checkint) {
		String check=""+checkint;
		boolean flag = false;
		if (check != null) {
			if (!check.trim().isEmpty()) {
				flag = true;
			}
		}
		return flag;
	}
	
	public static boolean isEmpty(Integer checkint) {
		String check=""+checkint;
		boolean flag = false;
		if (check != null) {

			if (check.trim().isEmpty()) {
				flag = true;
			}
		}

		return flag;
	}

}
